{% extends "base.html" %}
{% load tags_template %}
{% block extrahead%}
<script language="javascript" src="/js/jquery.js"></script>
{% endblock %}
{% block billboard %}
  <div id="nav-choice" >
  <h3>Show:</h3>
  <ul>
  <li><a href="?type=simple">Simple</a></li>
  <li><a href="?type=extend">Extend</a></li>
  </ul>
  <h3>Filter:</h3>
  <ul >
  <li><a href="/mytips">All</a></li>
  <li><a href="/mytips/todo">Todo</a></li>
  <li><a href="/mytips/done">Done</a></li>
  </ul>
  
   {% mytag user.id %}
   
  </div>
 
{% endblock %}

{% block content %}
{%ifequal request.session.type 'extend'%}
<ul>
   {% for entry in object_list %}
    <li class="{% cycle row1,row2 %}"><b>{{ entry.title }}</b>
    <div>
    <div style="color:gray;">{{ entry.pub_date|date:"Y/m/d P" }}</div>
    <p>{{ entry.content }}</p>
    <p>
       {% for tag in entry.tags.all %}
        <a href="/mytips/tag/{{tag.name}}"> {{ tag.name}}</a>
       {% endfor %}
    </p>
    
    <p><a href="/edit/{{entry.id}}">Edit</a> <a href="/del/{{entry.id}}">del</a> </p></div>
    </li>
  {% endfor %}
</ul>
{% else %}
<ul>
{% for entry in object_list %}
    <li class="{% cycle row1,row2 %}"><b>{{ entry.title }}</b> {{ entry.pub_date|date:"Y/m/d P" }} <a href="/edit/{{entry.id}}">edit</a> <a href="/del/{{entry.id}}">del</a>
    <div style="display:none">
    <p>{{ entry.content }}</p>
    <p>{{ entry.tag_list}}</p>
    
    <p><a href="/edit/{{entry.id}}">Edit</a> <a href="/del/{{entry.id}}">del</a> </p></div>
    </li>
    

{% endfor %}
</ul>

{% endifequal %}





{% endblock %}
